import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();

        char[] ch = str.toCharArray();

        int left = 0, right = 1, n = ch.length;
        int[] flag = new int[n];
        while(left <= n && right <= n) {
            if(ch[left] == ch[right]) {
                flag[left] = flag[right] = 1;
                left = right + 1;
                right = left + 1;
            }
            left++;
            right++;
        }

        for(int i = 0; i < n; i++) {
            if(flag[i] == 1) continue;
            System.out.print(ch[i]);
        }
    }

    /**
     * 第一题
     * @param args
     */
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        int left = in.nextInt(), right = in.nextInt();
        int count = 0;
        for(int i = left; i <= right; i++) {
            int tmp1 = i;
            while(tmp1 > 0) {
                int tmp2 = tmp1 % 10;
                if(tmp2 == 2) count++;
                tmp1 /= 10;
            }
        }
        System.out.print(count);
    }
}